/****************************************************************************/      
/* NAME:           Hal_TimerManagement.h                                    */      
/* PURPOSE:        Manage all basic input and output                        */      
/* CREATED_BY:     Vyx                                                      */      
/* CREATION_DATE:  03/07/2012                                               */  
/************************************** (C) Copyright 2012 AquaLink *********/ 

#ifndef TIMER_MANAGEMENT_DEF
#define TIMER_MANAGEMENT_DEF

#include "Hal_TimerManagement_Config.h"

typedef struct
{
  bool     Active : 1;
  bool     ToReached : 1;
  uint32_t Count;
  uint32_t Max;
}Timer_def_t;

/**        
  * @brief  Get if timer is reached the max value         
  * @param  Timer name        
  * @retval None        
  */ 
bool TIMER_GetIsToReached(TimerList_def_t TimerName);

/**        
  * @brief  Init and start a timer         
  * @param  Timer name, Max value to be reached        
  * @retval None        
  */ 
void TIMER_StartTimer(TimerList_def_t TimerName, uint32_t MaxValue);

/**        
  * @brief  Stop a timer
  * @param  Timer name        
  * @retval None        
  */ 
void TIMER_StopTimer(TimerList_def_t TimerName);

/**        
  * @brief  Reset a timer         
  * @param  Timer name       
  * @retval None        
  */ 
void TIMER_ResetTimer(TimerList_def_t TimerName);

/**        
  * @brief  Function for increment counter (call in systick)         
  * @param  None        
  * @retval None        
  */  
void TIMER_IncrementAllTimer();

#endif /* TIMER_MANAGEMENT_DEF*/